package com.shd.edanpei.base.dialog;

import android.content.Context;
import android.support.annotation.Nullable;
import android.text.TextUtils;

/**
 * Created by mc on 2018/3/20.
 */

public class Loader {

    private static LoadingDailog dialog;

    public static void show(Context context, @Nullable String str) {
        LoadingDailog.Builder loadBuilder = new LoadingDailog.Builder(context)
                .setCancelable(false)
                .setCancelOutside(false);

        if (!TextUtils.isEmpty(str)) {
            loadBuilder.setMessage(str);
        }
        dialog = loadBuilder.create();
        dialog.show();
    }

    public static void stop() {
        dialog.dismiss();
    }
}
